<?php
/**
 * Created by PhpStorm.
 * User: xrr
 * Date: 18-8-31
 * Time: 下午8:31
 */

namespace App;


use Illuminate\Database\Eloquent\Model;

class Apply extends Model
{
    const  APPLY_OVERDUE=-3;
    const  APPLY_REFUSED=-2;
    const  APPLY_CHECKING=-1;
    const  APPLY_DEFAULT=0;
    const  APPLY_PASSED=1;

    protected  $table = 'applies';

    protected $fillable = [
        'id','applyer_name','stu_id','phone','email','department','meeting_subject',
        'file','apply_time','day','ip'
    ];

    public function setExactTimeAttribute($value=""){
        if(is_array($value)){
            $value=implode(',',$value);
        }
        $this->attributes['exact_time']=$value;

    }
    public function getExactTimeAttribute($value=""){
        return explode(',',$value)?:[];
    }
}